package ph.com.gs3.chat.communicators;

import ph.com.gs3.chat.model.valueobject.application.APIResponse;
import ph.com.gs3.chat.model.valueobject.application.APIResponse.APIInvalidResponseException;
import ph.com.gs3.chat.model.valueobject.business.User;

public class UserCommunicatorModule extends HttpCommunicatorModule {

	public UserCommunicatorModule(HttpCommunicator communicator) {
		super(communicator);
	}

	public UserCommunicatorModule(HttpCommunicator communicator, String server) {
		super(communicator, server);
	}

	public APIResponse getOnlineUsers(User currentUser) throws CommunicatorException,
	        APIInvalidResponseException {

		commonValidation();

		String url = server + "/API/online-users";

		return getResponse(url, null);

	}

}
